package com.dxk.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@Controller
public class helloworld {

    @RequestMapping("/hello")
    public String hello(Model model){

        List<String> list = new ArrayList<String>();
        for (int i = 0; i <5 ; i++) {
            list.add("dxk"+i);
        }
        model.addAttribute("thy","im` thymeleaf");
        model.addAttribute("list",list);
        return "test";
    }
}
